﻿/*----------------------------------------------------------------
    // Copyright (C) 2009 江苏华招网
    // 版权所有。 
    // 作者：庄金冬 
    //
    // 文件名：IBLL_Area.cs
    // 文件功能描述：有关区域的业务逻辑接口
    // 创建标识：庄金冬2009-03-06
    //
    // 修改标识：
    // 修改描述：
    //
    // 修改标识：
    // 修改描述：
    //
    // 审核人：
    // 审核时间：
    // 审核说明：
 //----------------------------------------------------------------*/
using System;
using System.Collections.Generic;

using System.Text;
using HZ.DrugTrade.Model;
using System.Data;

namespace HZ.DrugTrade.IBLL
{
    /// <summary>
    /// 有关区域的业务逻辑接口
    /// </summary>
    public interface IBLL_Area
    {
        /// <summary>
        /// 根据地区编号获取地区名称
        /// </summary>
        /// <param name="AreaId"></param>
        /// <returns></returns>
        string GetAreaName(string AreaId);
        /// <summary>
        /// 获取所有区域信息
        /// </summary>
        /// <returns>区域信息集合</returns>
        IList<Area> GetAllArea();

        /// <summary>
        /// 获取所有省级区域信息
        /// </summary>
        /// <returns>区域信息集合</returns>
        IList<Area> GetAllProvince();

        /// <summary>
        /// 根据省级编号获取所有县区
        /// </summary>
        /// <param name="ProvinceAreaID">省级（含同级【如：直辖市，自治区等】）编号</param>
        /// <returns>区域信息集合</returns>
        IList<Area> GetAllCity(string ProvinceAreaID);

        /// <summary>
        /// 根据市级编号获取所有县区
        /// </summary>
        /// <param name="CityAreaID">市级编号</param>
        /// <returns>区域信息集合</returns>
        IList<Area> GetAllCounty(string CityAreaID);

        /// <summary>
        /// 根据地区编号获取地区信息
        /// </summary>
        /// <param name="AreaID">地区编号</param>
        /// <returns>区域信息</returns>
        Area GetArea(string AreaID);
        /// <summary>
        /// 获取未选择的区域 by zdc
        /// </summary>
        /// <param name="where"></param>
        /// <returns></returns>
        IList<Area> GetUnChoseArea(string where);
        /// <summary>
        /// 增加配送企业选择的地区 by zdc
        /// </summary>
        /// <param name="areaIds">地区</param>
        /// <param name="userid">企业id</param>
        /// <returns>return true or flase</returns>
        bool AddChoseArea(List<string> areaIds, string userid);
        /// <summary>
        /// 根据配送企业id获取已选择的地区 by zdc
        /// </summary>
        /// <param name="userid">企业id</param>
        /// <returns>return datatable</returns>
        DataTable GetSelectArea(string userid, string projectid);
        /// <summary>
        /// 处理已选择的区域 by zdc
        /// </summary>
        /// <param name="areaIds">地区id</param>
        /// <param name="type">类型：1提交 否则删除</param>
        /// <returns>return true or false</returns>
        bool DealSelectArea(string areaIds, int type,string userid);
        /// <summary>
        /// 获取要在本地区配送的企业 by zdc
        /// </summary>
        /// <param name="where"></param>
        /// <param name="currentPage"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalRecord"></param>
        /// <returns></returns>
        DataTable GetComById(string where, int currentPage, int pageSize, out int totalRecord);

        /// <summary>
        /// 获取要在本地区配送的企业 by zdc
        /// </summary>
        /// <param name="where"></param>
        /// <param name="currentPage"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalRecord"></param>
        /// <returns></returns>
        DataTable GetComByIdMS(string where, int currentPage, int pageSize, out int totalRecord);
        /// <summary>
        /// 审核在本地区备案的企业 By zdc
        /// </summary>
        /// <param name="companyidj"></param>
        /// <param name="checkType"></param>
        /// <returns></returns>
        bool CheckEnterPrise(string companyid, int checkType, string userId);
        /// <summary>
        /// 内蒙招标中心（zbzx）审核备案的企业 by zdc
        /// </summary>
        /// <param name="companyIds"></param>
        /// <param name="areaIds"></param>
        /// <param name="checkType"></param>
        /// <returns></returns>
        bool CheckAllEnterPrise(string companyIds, string areaIds, int checkType);
        /// <summary>
        /// 根据企业的id获取所有备案审核通过的地区 by zdc
        /// </summary>
        /// <param name="CompanyPS_Id"></param>
        /// <returns></returns>
        string GetNeedCity(string CompanyPS_Id, string projectid);
        /// <summary>
        /// 根据条件获取区域 by zdc
        /// </summary>
        /// <param name="companyids"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        string GetAreasByWhere(string companyids, int type);
         /// <summary>
        /// 中心端查询企业配送区域 add by Meng 2013-07-01
        /// </summary>
        /// <param name="where"></param>
        /// <param name="currentPage"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalRecord"></param>
        /// <returns></returns>
        DataTable GetCompanyAreaidByCompanyid(string where, int currentPage, int pageSize, out int totalRecord);
        /// <summary>
        /// 中心端编辑配送区域 add by Meng 2013-07-01
        /// </summary>
        /// <param name="areaIds">地区</param>
        /// <param name="userid">企业id</param>
        /// <returns>return true or flase</returns>
        bool UpdateComapnyAreaByCompanyid(List<string> areaIds, string userid);
         /// <summary>
        /// 中心端获取未选择和未提交的区域 by Meng 2013-07-04
        /// </summary>
        /// <param name="where"></param>
        /// <returns></returns>
        IList<Area> GetUnChoseAreaByZBZX(string where);
    }
}
